package pvz;

import javax.swing.*;

public class World extends JPanel{
    public static final int WIGTH = 800;
    public static final int HEIFHT = 533;
    public static final int START = 0;     //启动状态
    public static final int RUNMING = 1;   //运行状态
    public static final int PAUSE = 2;     //暂停状态
    public static final int GAME_OVER = 3; //游戏结束状态
    private int state = START; //当前状态(默认启动状态)

    public void action(){

    }

    public static void main(String[] args) {
        JFrame frame = new JFrame();
        World world = new World();
        frame.add(world);
        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        frame.setSize(World.WIGTH,World.HEIFHT);
        frame.setLocationRelativeTo(null);
        frame.setVisible(true);//设置窗口可见

        world.action();  //启动代码的执行
    }
}
